﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using GestorSQL.CaseFlowIntegration.Interface;
using System.Collections;

namespace GestorSQL.CaseFlowIntegration.Implementation.Mock
{
    public class CaseFlowMock : ICaseFlowTool
    {
        #region ICaseFlowTool Members

        public List<string> GetCaseNumberList(string userName)
        {
            List<string> retList = new List<string>();
            retList.Add("335566");
            retList.Add("335577");
            retList.Add("335588");
            retList.Add("335589");
            return retList;
        }

        public bool IsValidCaseNumber(string userName, string caseNumber)
        {
            if (userName.Equals("aramosb") && (
                caseNumber.ToUpper().Equals("335566") ||
                caseNumber.ToUpper().Equals("335577") ||
                caseNumber.ToUpper().Equals("335588") ||
                             caseNumber.ToUpper().Equals("335589")
                ))
                return true;
            return false;
        }

        public string GetCaseOwnerUserName(string caseNumber)
        {
            if (caseNumber.ToUpper().Equals("335566"))
                return "damonguip";
            if (caseNumber.ToUpper().Equals("335577"))
                return "mjrugeg";

            return string.Empty;
        }

        public bool IsValidUserName(string userName)
        {
            //ToDo: Validar nombre de Usuario en el LDAP
            if (userName.Equals("damonguip") ||
                userName.Equals("mjrugeg") ||
                userName.Equals("raromerof")
                )
                return true;
            return false;
        }

        #endregion
    }
}
